/PROG  PNS0058
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "53322606ZYL";
PROG_SIZE	= 3567;
CREATE		= DATE 15-08-11  TIME 19:37:22;
MODIFIED	= DATE 25-02-25  TIME 22:03:22;
FILE_NAME	= PNS0019;
VERSION		= 0;
LINE_COUNT	= 121;
MEMORY_SIZE	= 4027;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: R45 ;
   6:  !  PROGRAM: PNS0058 ;
   7:  !  PART:53322606 ;
   8:  !ZYL15-8-11********************** ;
   9:  DO[36:VACUUM FAULT]=PULSE,1.0sec ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  R[14:CG SENSETIVE]=90    ;
  13:  R[18:PICK TIME BEFORE]=1    ;
  14:  R[19:DROP TIME BEFORE]=.3    ;
  15:   ;
  16:  !------------------------------- ;
  17:  !BEGINNING OF PROGRAM ;
  18:  CALL PARTDROP    ;
  19:  COL GUARD ADJUST R[14] ;
  20:  UTOOL_NUM=1 ;
  21:  UFRAME_NUM=0 ;
  22:  PAYLOAD[3] ;
  23:  R[5:SPEED/SuDu]=10    ;
  24:  OVERRIDE=R[5:SPEED/SuDu] ;
  25:  !INITIATE TO PICK-POUNCE ;
  26:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  27:J P[2:PICK POUNCE] 50% CNT80 ACC100    ;
  28:  PAUSE ;
  29:  R[1:CYCLE TOTAL]=0    ;
  30:  TIMER[1]=RESET ;
  31:  TIMER[1]=START ;
  32:   ;
  33:  LBL[10:TOP OF LOOF] ;
  34:  OVERRIDE=R[5:SPEED/SuDu] ;
  35:   ;
  36:  TIMER[3]=STOP ;
  37:  TIMER[2]=STOP ;
  38:  R[1:CYCLE TOTAL]=R[1:CYCLE TOTAL]+1    ;
  39:  R[2:LAST CYCLE TIME]=TIMER[2]    ;
  40:  R[3:LAST SPM]=60/R[2:LAST CYCLE TIME]    ;
  41:  R[8:R MOVE TIME]=TIMER[3]    ;
  42:  TIMER[2]=RESET ;
  43:  TIMER[2]=START ;
  44:  TIMER[3]=RESET ;
  45:   ;
  46:  !PROCEED TO PICK ;
  47:  LBL[20] ;
  48:  IF DI[1:P4 PICK ENTRY OK]=ON AND DI[3:FROM R34 CLEAR]=ON AND DI[8:P4 PICK START]=ON,JMP LBL[25] ;
  49:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
  50:  JMP LBL[20] ;
  51:   ;
  52:  LBL[25] ;
  53:  WAIT DI[1:P4 PICK ENTRY OK]=ON AND DI[3:FROM R34 CLEAR]=ON AND DI[8:P4 PICK START]=ON    ;
  54:  R[5:SPEED/SuDu]=100    ;
  55:  TIMER[3]=START ;
  56:  OVERRIDE=R[5:SPEED/SuDu] ;
  57:J P[3:PICK APPROACH] 100% CNT70 ACC100    ;
  58:   ;
  59:J P[4:PICK] 100% CNT0 TB R[18]sec,CALL PARTPICK ACC100    ;
  60:  PAYLOAD[4] ;
  61:  CALL CHK_PICK    ;
  62:  MONITOR Z_CHECH ;
  63:J P[5:PICK DEPART] 100% CNT40 ACC100 TA R[20]sec,DO[5:TO R34 DROP START]=PULSE,1.0sec    ;
  64:  DO[8:P4 PARTS OUT]=PULSE,1.0sec ;
  65:  LBL[27] ;
  66:  CALL CHECKPICK    ;
  67:  IF DI[9:VACUUM ONL]=OFF OR DI[11:VACUUM ONR]=OFF,JMP LBL[27] ;
  68:L P[6] 3000mm/sec CNT100    ;
  69:J P[7:PICK CLEAR] 90% CNT100 ACC100    ;
  70:  LBL[30:GOTO DROP POUNCE] ;
  71:J P[8:DROP POUNCE] 90% CNT100 ACC100    ;
  72:  TIMER[3]=STOP ;
  73:  LBL[40:AT DROP POUNCE] ;
  74:  IF DI[2:P5 DROP ENTRY]=ON AND DI[4:FROM RU5 CLEAR]=ON AND DI[5:P5 DROP START]=ON,JMP LBL[80] ;
  75:  IF DI[7:PRESS STAMPING COMPLETE]=ON AND DI[2:P5 DROP ENTRY]=ON,JMP LBL[50] ;
  76:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[60] ;
  77:  JMP LBL[40] ;
  78:   ;
  79:  LBL[50:MOVE DROP SNEAK] ;
  80:  TIMER[3]=START ;
  81:  OVERRIDE=R[5:SPEED/SuDu] ;
  82:J P[9:DROP SNEAK] 80% CNT40 ACC100    ;
  83:  LBL[51:DROP OR C-P-S] ;
  84:  IF DI[2:P5 DROP ENTRY]=ON AND DI[4:FROM RU5 CLEAR]=ON AND DI[5:P5 DROP START]=ON,JMP LBL[80] ;
  85:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[40] ;
  86:  JMP LBL[51] ;
  87:  JMP LBL[50] ;
  88:   ;
  89:  LBL[60:MOVE CLS-PRS-ACC] ;
  90:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  91:  PAUSE ;
  92:  JMP LBL[30] ;
  93:   ;
  94:  LBL[80:DROP ENABLED] ;
  95:  TIMER[3]=START ;
  96:  !PROCEED TO DROP ;
  97:  OVERRIDE=R[5:SPEED/SuDu] ;
  98:J P[14] 80% CNT100    ;
  99:L P[10:DROP APPROACH] 3000mm/sec CNT30 ACC60    ;
 100:  MONITOR END Z_CHECH ;
 101:L P[11:DROP] 2500mm/sec CNT5 TB R[19]sec,CALL PARTDROP ACC100 BREAK    ;
 102:  DO[6:PART DROP COMPLETE]=PULSE,1.0sec ;
 103:  PAYLOAD[3] ;
 104:  CALL CHK_DROP    ;
 105:   ;
 106:J P[12:DROP DEPART] 100% CNT70 ACC120 TA    .01sec,DO[7:PRESS STAMPING START]=PULSE,1.0sec    ;
 107:J P[15:DROP OUT] 100% CNT100 ACC120    ;
 108:J P[13:DROP CLEAR] 100% CNT100 ACC110 BREAK    ;
 109:  !GOTO PICK POUNCE ;
 110:J P[2:PICK POUNCE] 100% CNT100 ACC100 BREAK    ;
 111:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
 112:  JMP LBL[10] ;
 113:   ;
 114:  LBL[90:END OF CYCLE] ;
 115:  TIMER[1]=STOP ;
 116:  R[4:TOTAL CYCLE TIME]=TIMER[1]    ;
 117:  MONITOR END MON_PICK ;
 118:J P[1:MIDDLE] 50% CNT100    ;
 119:  MOVE TO HOME    ;
 120:   ;
 121:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2086.441  mm,	Y =     -.008  mm,	Z =  -835.589  mm,
	W =   180.000 deg,	P =     -.000 deg,	R =  -179.999 deg,
	E1=   107.701 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2202.451  mm,	Y =  1463.313  mm,	Z =  -981.297  mm,
	W =  -177.522 deg,	P =     -.503 deg,	R =   137.685 deg,
	E1=    55.359 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2592.687  mm,	Y =  3188.277  mm,	Z =  -923.075  mm,
	W =   179.899 deg,	P =      .184 deg,	R =    90.717 deg,
	E1=   103.792 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2592.766  mm,	Y =  3188.284  mm,	Z = -1177.727  mm,
	W =   179.898 deg,	P =      .183 deg,	R =    90.716 deg,
	E1=   103.789 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2592.776  mm,	Y =  3188.288  mm,	Z =  -988.713  mm,
	W =   172.710 deg,	P =    -1.615 deg,	R =    90.636 deg,
	E1=   103.789 deg
};
P[6]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2698.531  mm,	Y =  2055.252  mm,	Z =  -947.889  mm,
	W =   173.259 deg,	P =     -.289 deg,	R =    90.672 deg,
	E1=   103.789 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  1852.295  mm,	Y =  1079.171  mm,	Z =  -976.541  mm,
	W =   178.543 deg,	P =     3.593 deg,	R =   147.806 deg,
	E1=   112.181 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2060.308  mm,	Y =  -845.483  mm,	Z =  -988.726  mm,
	W =  -179.323 deg,	P =     -.103 deg,	R =  -145.204 deg,
	E1=   121.982 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2701.479  mm,	Y = -1580.637  mm,	Z =  -982.779  mm,
	W =   178.719 deg,	P =     -.564 deg,	R =  -111.256 deg,
	E1=   126.941 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2701.581  mm,	Y = -3184.827  mm,	Z =  -982.673  mm,
	W =   178.722 deg,	P =     -.566 deg,	R =   -88.702 deg,
	E1=   103.395 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2697.128  mm,	Y = -3184.827  mm,	Z = -1148.447  mm,
	W =  -174.657 deg,	P =     -.710 deg,	R =   -89.006 deg,
	E1=   103.395 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2701.588  mm,	Y = -3184.824  mm,	Z = -1009.792  mm,
	W =   177.982 deg,	P =     -.561 deg,	R =   -88.977 deg,
	E1=   103.395 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2056.043  mm,	Y = -1313.494  mm,	Z = -1047.421  mm,
	W =  -179.858 deg,	P =     -.806 deg,	R =  -142.676 deg,
	E1=    86.035 deg
};
P[14]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2701.479  mm,	Y = -1580.637  mm,	Z =  -982.779  mm,
	W =   178.719 deg,	P =     -.564 deg,	R =  -111.256 deg,
	E1=   126.941 deg
};
P[15:"DROP OUT"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2701.536  mm,	Y = -2395.935  mm,	Z = -1020.000  mm,
	W =  -179.529 deg,	P =     -.602 deg,	R =   -97.640 deg,
	E1=   103.395 deg
};
/END
